import asyncio
async def task(name,delay):
    print(f'{name}-start')
    await asyncio.sleep(delay)
    print(f'{name}-end')

async def main():
    print('main start')
    task01Fu = asyncio.create_task(task('task01',2))
    print('main middle')
    task02Fy = asyncio.create_task(task('task02', 2))
    await task01Fu
    await task02Fy
    print('main end')

asyncio.run(main())